<?php
/**
 * Maker: 梁康宁
 * Time: 2019-09-18 11:37:48
*/
namespace app\common\model;
use think\Model;
use think\Db;
class Plan extends Model
{
    public $statusList = [1=>'正常',2=>'禁用'];
	public function website(){
		return $this->hasOne('Website', 'id', 'website_id');
	}

    public function getStatusTextAttr($value,$data){
        if ($data['status']==1){
            return '<font color="green">'.$this->statusList[$data['status']].'</font>';
        }else{
            return '<font color="red">'.$this->statusList[$data['status']].'</font>';
        }
    }

}
?>